﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Runtime.Serialization;

namespace Celeriq.Common
{
	[Serializable()]
	[DataContract()]
	[KnownType(typeof(GeoCode))]
	[KnownType(typeof(GeoCodeFieldFilter))]
	public class RefinementItem : System.ICloneable
	{
		[DataMember]
		public string FieldValue;

		[DataMember]
		public long? MinValue;

		[DataMember]
		public long? MaxValue;

		[DataMember]
		public long DVIdx;

		[DataMember]
		public int Count;

		public override string ToString()
		{
			return this.FieldValue;
		}

		object ICloneable.Clone()
		{
			var retval = new RefinementItem();
			retval.Count = this.Count;
			retval.DVIdx = this.DVIdx;
			retval.FieldValue = this.FieldValue;
			retval.MaxValue = this.MaxValue;
			retval.MinValue = this.MinValue;
			return retval;
		}
	}
}
